<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Global Image - Editar Tipo Usu&aacute;rio</title>
            <link rel="stylesheet" type="text/css" href="/globalimage2/faces/jsfcrud.css" /><%@ include file="/WEB-INF/jspf/AjaxScripts.jspf" %><script type="text/javascript" src="/globalimage2/faces/jsfcrud.js"></script>
        </head>
        <body>
            <%@include file="../../WEB-INF/jspf/header/head.jspf"%>
            <div style="float:left">
                <div style="float:left">
                    <%@include file="../../WEB-INF/jspf/header/menuDinamico.jspf"%>
                </div>
                <div id="div_content">
                    <div class="bgContentTable">
                        <div class="titleTable"><h3>Editar tipo de usu&aacute;rio</h3></div><br />


                        <h:form>
                            <h:panelGroup id="messagePanel" layout="block">
                                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                            </h:panelGroup>

                            <h:commandLink action="#{tipoUsuario.edit}" value="Salvar">
                                <f:param name="jsfcrud.currentTipoUsuario" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][tipoUsuario.tipoUsuario][tipoUsuario.converter].jsfcrud_invoke}"/>
                            </h:commandLink>
                            &nbsp;|&nbsp;
                            <h:commandLink value="Exibir" action="#{usuario.detailSetup}">
                                <f:param name="jsfcrud.currentTipoUsuario" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][tipoUsuario.tipoUsuario][tipoUsuario.converter].jsfcrud_invoke}"/>

                            </h:commandLink>
                            &nbsp;|&nbsp;
                            <h:commandLink action="#{tipoUsuario.detailSetup}" value="Exibir" immediate="true">
                                <f:param name="jsfcrud.currentTipoUsuario" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][tipoUsuario.tipoUsuario][tipoUsuario.converter].jsfcrud_invoke}"/>
                            </h:commandLink>

                            <h:panelGrid columns="2">
                                <h:outputText value="Nome:"/>
                                <h:inputText id="nome" value="#{tipoUsuario.tipoUsuario.nome}" title="Nome" maxlength="254" size="45" required="true" requiredMessage="The nome field is required." />
                                <h:outputText value=":"/>
                                
                                <h:outputText value="Vinculo:"/>
                                <h:selectOneMenu required="true" value="#{tipoUsuario.tipoUsuario.vinculoId}">
                                    <f:selectItems value="#{vinculo.vinculoItemsAvailableSelectOne}"/>
                                </h:selectOneMenu>

                                <h:outputText value="Permissões:"/>
                                <h:selectManyListbox id="permissaoCollection" style="height:400px;width:300px" value="#{tipoUsuario.tipoUsuario.jsfcrud_transform[jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method.collectionToArray][jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method.arrayToList].permissaoCollection}" title="PermissaoCollection" size="6" converter="#{permissao.converter}" >
                                    <f:selectItems value="#{permissao.permissaoItemsAvailableSelectMany}"/>
                                </h:selectManyListbox>
                            </h:panelGrid>
                        </h:form>
                    </div>
                </div>
            </div>
        </body>
    </html>
</f:view>
